Properly align mask and pixbuf if a subarea is exposed. (#135423, fix by
authorMatthias Clasen <maclas@gmx.de>
Sat, 3 Jul 2004 02:43:06 +0000 (02:43 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 3 Jul 2004 02:43:06 +0000 (02:43 +0000)
Fri Jul  2 22:41:27 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkimage.c (gtk_image_expose): Properly align mask and
pixbuf if a subarea is exposed.  (#135423, fix by John Ehresman)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkimage.c

index 335dc6e6f7e6fd87d9ff7598157b4a91dc1cca05..11aad041e2d93768acf12b00690300433a5208d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul  2 22:41:27 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkimage.c (gtk_image_expose): Properly align mask and
+       pixbuf if a subarea is exposed.  (#135423, fix by John Ehresman)
+
 Fri Jul  2 21:40:21 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtknotebook.c (gtk_notebook_realize): Add scroll events
index 335dc6e6f7e6fd87d9ff7598157b4a91dc1cca05..11aad041e2d93768acf12b00690300433a5208d0 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul  2 22:41:27 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkimage.c (gtk_image_expose): Properly align mask and
+       pixbuf if a subarea is exposed.  (#135423, fix by John Ehresman)
+
 Fri Jul  2 21:40:21 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtknotebook.c (gtk_notebook_realize): Add scroll events
index 335dc6e6f7e6fd87d9ff7598157b4a91dc1cca05..11aad041e2d93768acf12b00690300433a5208d0 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul  2 22:41:27 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkimage.c (gtk_image_expose): Properly align mask and
+       pixbuf if a subarea is exposed.  (#135423, fix by John Ehresman)
+
 Fri Jul  2 21:40:21 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtknotebook.c (gtk_notebook_realize): Add scroll events
index 335dc6e6f7e6fd87d9ff7598157b4a91dc1cca05..11aad041e2d93768acf12b00690300433a5208d0 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul  2 22:41:27 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkimage.c (gtk_image_expose): Properly align mask and
+       pixbuf if a subarea is exposed.  (#135423, fix by John Ehresman)
+
 Fri Jul  2 21:40:21 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtknotebook.c (gtk_notebook_realize): Add scroll events
index 24708d53ea975f358380d19ba42e19c71dbe4cbe..4b45182c82bf402b85c0b502bf93d015d723825b 100644 (file)
@@ -1221,7 +1221,7 @@ gtk_image_expose (GtkWidget      *widget,
       GtkMisc *misc;
       GdkRectangle area, image_bound;
       gfloat xalign;
-      gint x, y;
+      gint x, y, mask_x, mask_y;
       GdkBitmap *mask;
       GdkPixbuf *pixbuf;
       gboolean needs_state_transform;
@@ -1253,6 +1253,8 @@ gtk_image_expose (GtkWidget      *widget,
       y = floor (widget->allocation.y + misc->ypad 
                 + ((widget->allocation.height - widget->requisition.height) * misc->yalign)
                 + 0.5);
+      mask_x = x;
+      mask_y = y;
       
       image_bound.x = x;
       image_bound.y = y;      
@@ -1398,7 +1400,7 @@ gtk_image_expose (GtkWidget      *widget,
       if (mask)
        {
          gdk_gc_set_clip_mask (widget->style->black_gc, mask);
-         gdk_gc_set_clip_origin (widget->style->black_gc, x, y);
+         gdk_gc_set_clip_origin (widget->style->black_gc, mask_x, mask_y);
        }
 
       if (gdk_rectangle_intersect (&image_bound, &area, &image_bound))